$def with (title=None)

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">

<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>seddit test bed</title>
	
	<link rel="stylesheet" href="/public/default.css" type="text/css" charset="utf-8">
	<script src="/public/prototype.js" type="text/javascript" charset="utf-8"></script>
	
	<script type="text/javascript" charset="utf-8">
	
        // all the code within this observer will get loaded as soon
        // as the DOM has been loaded.
        Event.observe(window, 'load', function() {
            Event.observe('chat_functions', 'submit', send_message); // new message?
        });

        new Ajax.Updater('/backend', {
            method: 'get',
            onSuccess: function(transport) {
                var json = transport.responseText.evalJSON();
                var chat_div = document.getElementById('chat_box');


                //  TODO:  lets use prototype's enumerable class to iterate through 
                //         the json content instead of a for loop, reminds me too much
                //         of java.
                //  ALSO:  get rid of all the inner html crap, prototype has a better 
                //         facility for modifying the DOM.
                for(k=0; k < json.messages.message.length; k++)
                {
                    chat_div.innerHTML += json.messages.message[k].user + ' (';
                    chat_div.innerHTML += json.messages.message[k].time + ') ';
                    chat_div.innerHTML +=json.messages.message[k].text + " <br /> ";
                }         
            }
        });

        function send_message()
        {
            new Ajax.Request('/backend', {
               method: 'post',
               parameters: \$('chat_functions').serialize(true)
            });
        }
	   
	</script>
	
</head>
<body>
    
    <h1>chat test bed (<span id="ajax_status">normal</span>)</h1>
    
    <div id="chat_box">
    </div>


    <div id="bottom">
        <div class="wrapper">
            <form id="chat_functions">
                <input type="hidden" name="author" value="Drew Newberry" id="author">
                <textarea name="content" rows="2" cols="40"></textarea>
                <input type="submit" id="submit" value="Submit" />
            </form>
        </div>
    </div>


</body>
</html>
